<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .test{
            width: 100px;
            height: 100px;
            background-color: pink;
        }
    </style>
</head>
<body>
    <div id="test">

    </div>
</body>
<script>
    var sec = document.createElement("section")
    sec.classList.add('test')
    sec.innerText = "111"

    var div = document.getElementById("test")
    div.appendChild(sec)
</script>
</html>